<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <meta http-equiv="CACHE-CONTROL" content="no-cache" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="-1" />
    <title>XiLin</title>

    <link rel="stylesheet" href="${resource(dir:'css',file:'main.css')}" />
    <link rel="stylesheet" href="${resource(dir:'css/blitzer',file:'jquery-ui-1.8.custom.css')}" />
    <link rel="stylesheet" href="${resource(dir:'css',file:'tablesorter.css')}" />
    <link rel="stylesheet" href="${resource(dir:'css',file:'jquery.cluetip.css')}" />
    <link rel="stylesheet" href="${resource(dir:'css',file:'mountain_dusk.css')}" type="text/css" media="screen"/>
    <link rel="stylesheet" href="${resource(dir:'css',file:'payment.css')}" />

    <g:javascript library="jquery" plugin="jquery"/>

    <script type="text/javascript" src="${resource(dir:'js/jquery', file:'jquery-ui-1.8.custom.min.js')}"></script>
    <script type="text/javascript" src="${resource(dir:'js/jquery', file:'jquery.tablesorter.min.js')}"></script>
    <script type="text/javascript" src="${resource(dir:'js/jquery', file:'jquery.tablesorter.pager.js')}"></script>
    <script type="text/javascript" src="${resource(dir:'js/jquery', file:'jquery.hoverIntent.js')}"></script>
    <script type="text/javascript" src="${resource(dir:'js/jquery', file:'jquery.bgiframe.min.js')}"></script>
    <script type="text/javascript" src="${resource(dir:'js/jquery', file:'jquery.cluetip.js')}"></script>
    <script type="text/javascript" src="${resource(dir:'js/jquery', file:'jquery.alphanumeric.pack.js')}"></script>
    <script type="text/javascript" src="${resource(dir:'js/jquery', file:'jquery.maskedinput-1.2.2.js')}"></script>
    <script type="text/javascript" src="${resource(dir:'js/jquery', file:'jquery.maskMoney.js')}"></script>
    <script type="text/javascript" src="${resource(dir:'js', file:'main.js')}"></script>

    <script type="text/javascript">
    </script>
    <g:set var="mapping"
        value="[
            ROLE_ADMIN  : 'admin',
            ROLE_USER   : 'myxilin',
            ROLE_BOARD  : 'board',
            ROLE_TEACHER: 'teacher'
        ]"
    />

</head>
<body>
<div id="main">
        <div class="sheet">
            <div class="sheet-tl"></div>
            <div class="sheet-tr"></div>
            <div class="sheet-bl"></div>
            <div class="sheet-br"></div>
            <div class="sheet-tc"></div>
            <div class="sheet-bc"></div>
            <div class="sheet-cl"></div>
            <div class="sheet-cr"></div>
            <div class="sheet-cc"></div>
            <div class="sheet-body">
                <div class="header">
                    <div class="header-jpeg"></div>
                </div>
                <div class="semester" style="display:none">
                    Semester <x:semesterSelection/>
                </div>

                <div class="nav">
                	<div class="l"></div>
                	<div class="r"></div>
                	<ul class="menu">
                            <g:render template="../home/menu" />
                	</ul>
                </div>

                <div id="menu-content">
                  <g:if test="${session.roles != null}">
                    <g:render template="../${mapping[session.roles[0]]}/menuContent" />
                  </g:if>
                  <g:else>
                    <g:render template="../home/menuContent" />
                  </g:else>
                </div>

                <g:render template="../home/footer" />
            </div>
        </div>
        <div class="cleared"></div>
        <!-- Please leave author link intact as attribution for our hard work -->
        <p class="page-footer"><a href="http://www.HIGHIMPACT-SEO.CO.UK/">SEO Services</a></p>
        <!-- End Of Please leave author link intact as attribution for our hard work -->
        <div class="messageDiv"></div>

    </div>
    <script type="text/javascript">
        <g:if test="${session.roles != null}">
          $('.login').hide();
          $('.logout').show();
        </g:if>
        <g:else>
          $('.logout').hide();
          $('.login').show();
        </g:else>

        var home = {
          checkLogin : function(loggedIn) {
            if (!loggedIn) {
              $('#menu-content').load("${request.contextPath}/login/auth");
            }
            else {
              $('#menu-content').load("${request.contextPath}/myxilin/");
            }
            return false;
          }
        }
        //$(document).ajaxStop(function() {
        //  $(this).maskFields();
        //});
    </script>

</body>
<head>
  <meta http-equiv="CACHE-CONTROL" content="no-cache" />
  <meta http-equiv="Pragma" content="no-cache" />
  <meta http-equiv="Expires" content="-1" />
</head>
</html>
